﻿@model sBlog.Net.Models.PostModel
<div class="post">
    @{
        var url = Url.RouteUrl("IndividualPost", new { year = Model.Post.PostYear, month = Model.Post.PostMonth, url = Model.Post.PostUrl, status = string.Empty });
    }
    <h1 class="postContenttitle">
        <a href="@url">@Html.Raw(Model.Post.PostTitle)</a></h1>
    <h2 style="display: none;">
        <a href="@url">@Html.Raw(Model.Post.PostDescription)</a></h2>
    <p class="meta">
        <span class="dateContent">
            @DateTime.Parse(Model.Post.PublicDate.ToString()).ToString("dd/MM/yyyy HH:mm tt")
        </span>
    </p>
    <br />
    <div class="entry">
        @*PlayVideo*@
        @if (Model.Post.VideoUrl != "")
        {
            <div>
                @Html.Partial("PlayVideo", Model.Post)
            </div>
        }
        <div class="postContent">
            @Html.Raw(Model.Post.PostContent)
        </div>
        <p class="meta">
            <span class="posted" style="float: right;">Đăng bởi <b>@Html.ActionLink(Model.Post.OwnerUserName, "PostsByAuthor", "Author", new { authorName = Model.Post.UserName }, new { }).</b>
                Mục: @Html.Partial("PostCategories", Model.Post.Categories)
                <img src="@Url.Content("~/Content/Images/MlogThem/IconView.png")" width="17" height="12" alt="view"/><span
                    class="posted" style="float: none;">@Convert.ToInt32(@Model.Post.ViewCount).ToString("#,##0")</span>
                &nbsp;<img src="@Url.Content("~/Content/Images/MlogThem/heart-follow.png")" width="12" height="12" alt="like" onclick="return like();" style="cursor:pointer;"/>&nbsp;
                <span id="LikeCount">
                    @Convert.ToInt32(@Model.Post.LikeCount).ToString("#,##0")
                </span></span>
            <br />
            <span class="posted" style="float: right;">Xem thêm theo chủ đề @Html.Partial("PostTagsDetail", Model.Post.Tags)</span>
        </p>
    </div>
</div>
